//
//  YMVideoMessageBody.h
//  YMIM
//
//  Created by reyzhang on 2022/3/24.
//

#import "YMMessageBody.h"
#import <CoreGraphics/CoreGraphics.h>

NS_ASSUME_NONNULL_BEGIN

@interface YMVideoMessageBody : YMMessageBody
@property (nonatomic, assign) CGFloat width; //第一帧图片宽度
@property (nonatomic, assign) CGFloat height; //第一帧图片高度

@property (nonatomic, strong) NSString *imageUrl; //第一帧图片地址

@property (nonatomic, assign) CGFloat duration; //视频时长


/**
 * 创建一个视频消息体
 */
- (instancetype)initWithVideoUrl:(NSString *)videoUrl
                        duration:(CGFloat)duration
                   coverImageUrl:(NSString *)imageUrl
                 coverImageWidth:(CGFloat)imageWidth
                coverImageHeight:(CGFloat)imageHeight;



+ (instancetype)bodyWithVideoUrl:(NSString *)videoUrl
                        duration:(CGFloat)duration
                   coverImageUrl:(NSString *)imageUrl
                 coverImageWidth:(CGFloat)imageWidth
                coverImageHeight:(CGFloat)imageHeight;

@end

NS_ASSUME_NONNULL_END
